<?php
$data = array();
$dara['marriage'] = $_POST['is_married'];
$data['son']      = $_POST['is_parent'];
$data['job']      = $_POST['job'];
$data['hasbuy']      = $_POST['rad'];
$data['manyi']      = $_POST['manyi'];
$data['jieshou']      = $_POST['jieshou'];
$data['tuijian']      = $_POST['tuijian'];
$data['money']      = $_POST['monthly_consume'];
$data['goods']      = implode(",", $_POST['good']);
$data['why']      = implode(",", $_POST['why']);
$data['cuxiao']      = implode(",", $_POST['cuxiao']);
$data['ad']      = implode(",", $_POST['ad']);
$data['gulv']      = implode(",", $_POST['doubt']);
$data['user_id']   = $user_id;
$keys = array();
$values = array();
foreach($data as $k=>$v){
	$keys[] = $k;
	$values[] = "'$v'";
}
$sql = "Insert into ecs_user_file(".implode(",", $keys).") values(".implode(",", $values).")";
echo $sql;
$db->query($sql);
$goods_a=array("安全套","震动棒","飞机杯","情趣内衣","润滑液","夫妻共用振动器");
$why_a = array("产品品牌","产品价格", "产品质量", "产品口碑","产品声誉");
$cuxiao_a = array("打折","专题促销", "购物返劵", "购物送礼", "免运费" ,"积分", "礼品卡");
$ad_a = array("手机短信","邮寄目录","电子邮件","电话通知");
$gulv_a = array("产品质量","网上支付的安全性","配送问题", "产品的售后服务");
?>